﻿:root {
    --color-bossy-01: #e77918;
    --color-bossy-02: #009239;
    --color-02: #ffb86a;
    --color-03: #ffd7a8;
    --color-04: #ffedd4;
    --color-05: #fef9c2;
    --color-06: #fff085;
    --color-red-01: #fee2e2;
    --color-red-02: #fecaca;
    --color-red-03: #ffa2a2;
    --color-red-04: #ff6467;
    --color-red-05: #fb2c36;
    --color-red-06: #fb2c36;
    --color-red-07: #c10007;
    --bg-100: #f1f5f9;
    --bg-200: #e2e8f0;
    --border-300: #cad5e2;
    --border-400: #90a1b9;
    --border-700: #314158;
}


/* Estilos modal datatable*/
.config__modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition-duration: 500ms;
    transition-property: transform;
    transform: scale(0);
}

.config__modal--scale {
    transform: scale(1);
}

.config__modal--container {
    position: relative;
    background-color: white;
    border-radius: 0.5rem;
    width: 99%;
    max-width: 900px;
    min-height: 500px;
    max-height: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config__modal--close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    height: 2rem;
    width: 2rem;
    border-radius: 99px;
    background-color: var(--color-red-01);
    border: none;
    transition: background-color 0.2s ease-in-out;
}

.config__modal--close:hover {
    background-color: var(--color-red-02);
}

.config__modal--close img {
    width: 50%;
    height: 50%;
    display: block;
    margin: auto;
}

.config__modal--container .title__modal {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: start;
    margin: 0;
    color: #000000;
    background-color: var(--bg-100);
    padding: 1rem;
    border-bottom: 1px solid var(--border-300);
    border-radius: 0.75rem 0.75rem 0 0;
}

.config__modal--body {
    overflow-y: auto;
    color: #374151;
    border-radius: 0.375rem;
    padding: 1rem;
}

.create__new--container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn__create-survey {
    width: auto;
    min-width: 150px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    background-color: var(--color-04) !important;
    border-radius: 9999px;
    border: 1px solid var(--color-bossy-01);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.btn__create-survey img {
    width: 1.5rem;
    height: 1.5rem;
    display: inline;
}

.btn__create-survey span {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--color-bossy-01);
    display: inline;
}

#tablaEncuestas {
    width: 100%;
    border: 1px solid var(--border-300);
    border-radius: 0.5rem;
    overflow: hidden;
}

#tablaEncuestas thead {
    background-color: var(--bg-100);
}

#tablaEncuestas thead tr th {
    width: 100%;
    padding-bottom: 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 0.05em;
}

/*====================  */
/* Optcional poner los estilos de datatable aquí */
/*====================  */




/* =================== */
/* Estilos sidebar */
/* =================== */
.sidebar__survery--section {
    background-color: white;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 99999;
    right: 0px;
    box-shadow: 3px 10px 14px #d2d2e7;
    transition-duration: 900ms;
    transition-property: transform;
    transform: translateX(100%);
}

.sidebar__content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.sidebar__content--header {
    width: 100%;
    min-height: 3rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: var(--bg-100);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid var(--border-300);
}

.sidebar__content--header span {
    width: auto;
    color: #000000;
    display: block;
    text-align: center;
}

.close__edit--sidebar {
    width: 50%;
    max-width: 170px;
    background-color: #e2e8f0;
    padding: 0.5rem;
    border-radius: 0.75rem;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
}

.close__edit--sidebar .button__edit,
.button__save {
    border: 1px solid var(--color-bossy-01);
    height: 2rem;
    width: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 99px;
    color: var(--color-bossy-01);
    font-weight: 700;
    background-color: var(--color-04);
    cursor: pointer;
}

.button__close {
    border: none;
    height: 2rem;
    width: 2rem;
    padding: 1.5px;
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--color-red-02);
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
}

.button__close img {
    height: 50%;
    width: 50%;
    display: block;
    margin: auto;
}

.button__close:hover {
    background-color: var(--color-red-02);
}

.siderbar__content--body {
    width: 100%;
    height: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 99;
}

.siderbar__content--body h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.active__state {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.active__state .active__true,
.active__false {
    padding: 0.25rem 0.75rem;
    font-size: 0.87rem;
    font-weight: 500;
    border-radius: 99px;
    border: 1px solid;
}

.active__true {
    border-color: #2ba758;
    background-color: #dcfce7;
    color: #2ba758;
}

.active__false {
    border-color: var(--color-red-05);
    color: var(--color-red-05);
    background-color: var(--color-red-01);
}

.answers__survey--list {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid var(--border-300);
    padding: 10px;
}

.answers__survey--list h3 {
    font-size: 0.87rem;
    font-weight: 500;
    color: var(--border-700);
    margin-bottom: 0.5rem;
}

.answers__survey--list ul {
    color: var(--border-700);
    font-size: 0.87rem;
    list-style: none;
    margin-bottom: .7px;
    line-height: 1.8;
}

/* ============================ */
/* Seccion edicion de elementos */
/* ============================ */
.edit__element--section {
    position: absolute;
    z-index: 999;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    padding: 0 12px;
    background-color: white;
}

.cancel__save--btn {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0.25rem;
    gap: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    position: sticky;
    top: 0;
}

.cancel__save--btn .cancel-edition {
    background-color: var(--color-red-01);
    border-radius: 9999px;
    height: auto;
    padding: 0.5rem;
    border: 1px solid var(--color-red-05);
    color: var(--color-red-05);
    font-weight: 500;
}

.cancel__save--btn .save-edition {
    background-color: var(--color-04);
    border-radius: 9999px;
    height: auto;
    padding: 0.5rem;
    border: 1px solid var(--color-bossy-01);
    color: var(--color-bossy-01);
    font-weight: 500;
}

.title__div {
    width: 100%;
    border: 1px solid var(--bg-200);
    padding: 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.title__div label {
    font-weight: 600;
}

.title__div input {
    background-color: var(--bg-100);
    border: 1px solid var(--border-300);
    padding: 0.5rem;
    border-radius: 0.5rem;
    width: 100%;
}

.survey-toggle {
    width: 50%;
    border: 1px solid #cbd5e1;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.state-label {
    font-weight: 600;
}

.toggle-wrapper {
    position: relative;
    display: inline-block;
    width: 4rem;
    height: 2rem;
    cursor: pointer;
}

.toggle-checkbox {
    display: none;
}

.toggle-track {
    width: 100%;
    height: 100%;
    background-color: var(--color-red-05);
    border: 1px solid var(--color-red-04);
    border-radius: 9999px;
    transition: background-color 0.3s, border-color 0.3s;
}

.toggle-thumb {
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

/* Estilo cuando está activo */
.toggle-checkbox:checked+.toggle-track {
    background-color: #4ade80;
    border-color: #86efac;
}

.toggle-checkbox:checked~.toggle-thumb {
    transform: translateX(2rem);
}

.answer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.answer__box {
    border: 1px solid var(--border-300);
    padding: 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: start;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.answer__box .delete-field {
    width: 2rem;
    height: 2rem;
    padding: 0.5rem;
    border-radius: 9999px;
    background-color: #fca5a5;
    color: #b91c1c;
    font-weight: 600;
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
}

.answer__box label {
    font-weight: 600;
}

#overlay-encuestas input[type="text"] {
    background-color: var(--bg-100);
    border: 1px solid var(--border-300);
    padding: 0.5rem;
    border-radius: 0.5rem;
    width: 100%;
}

#overlay-encuestas input[type="text"]:focus {
    border-color: var(--color-bossy-01);
    outline: none;
    box-shadow: 1px 1px 2px 2px var(--color-04);
    background-color: white;
}

.section__new-register {
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    padding: 1rem 0;
}

.footer__form {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.footer__form .cancel__register {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
    border-radius: 9999px;
    background-color: #e2e8f0;
    color: var(--border-700);
    font-weight: 500;
    border-color: #cbd5e1 !important;
}

.footer__form .cancel__register:hover {
    background-color: #cbd5e1;
}

.footer__form .save__register {
    background-color: var(--color-04) !important;
    border-radius: 9999px;
    height: auto;
    font-weight: 500;
    padding: 0.5rem;
    border-color: var(--color-bossy-01);
    color: var(--border-700);
}

.footer__form .save__register:hover {
    background-color: var(--color-03) !important;
}

/* ============================ */
/* Seccion estilos nueva encuesta*/
/* ============================ */
.siderbar__content--body .add__amswer {
    width: auto;
    max-width: 16rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: var(--color-bossy-01);
    border: 1px solid var(--color-bossy-01);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    background-color: var(--color-04);
    margin-bottom: 0.5rem;
}

.siderbar__content--body .sidebar__content--info {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem;
    color: var(--color-bossy-01);
    background-color: #ffedd5;
    border-radius: 0.375rem;
}

/* ============================ */
/* Estilos modal confirmar eliminación */
/* ============================ */
.modal__confirm--deletion {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 0.5);
    z-index: 99999;
}

.modal__confirm--html {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 1px 1px 16px -7px #000000db;
    width: 420px;
    max-width: 90%;
    padding: 1rem;
}

.modal__confirm--header {
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-300);
    padding-bottom: .5rem;
}

.modal__confirm--header h2 {
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--border-700);
}

.moodal__confirm--main {
    margin-top: 0.75rem;
    font-size: 0.87rem;
    color: var(--border-700);
}

.moodal__confirm--main .content__warning {
    background-color: var(--color-05);
    border: 1px solid var(--color-06);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.content__warning .warning {
    color: var(--color-bossy-01);
    font-size: 0.955rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.content__warning .warning__message {
    color: var(--border-700);
    font-size: 0.75rem;
}

.modal__confirm--footer {
    display: flex;
    justify-content: end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.modal__confirm--footer button {
    padding: 0.37rem 1rem;
    height: 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.modal__confirm--footer .btn__cancel {
    background-color: var(--bg-100);
    color: var(--border-700);
    border-color: var(--border-300);
}

.modal__confirm--footer .btn__cancel:hover {
    background-color: var(--bg-200);
}

.modal__confirm--footer .btn__confirm {
    border-color: var(--color-red-04);
    background-color: var(--color-red-06);
    color: white;
}

.modal__confirm--footer .btn__confirm:hover {
    background-color: var(--color-red-07);
    color: white;
}

/* Estilos sidebar */
@media screen and (width > 640px) {
    .sidebar__content--header {
        flex-direction: row;
    }

    .create__new--container {
        justify-content: end;

    }
}

@media screen and (width > 768px) {
    .sidebar__content--header {
        flex-direction: column;
    }

    .sidebar__survery--section {
        width: 42%;
    }
}

@media screen and (width > 1280px) {
    .sidebar__content--header {
        flex-direction: row;
    }

    .close__edit--sidebar {
        margin: 0;
    }
}